package com.example.demo.impl;

import com.example.demo.entity.User;
import com.example.demo.dao.UserDao;
import com.example.demo.service.loginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class loginServiceImpl implements loginService {
    @Autowired
    private UserDao userDao;

    @Override
    public User getUser(String username, String password) {
        return userDao.getByUsernameAndPassword(username,password);
    }
    @Override
    public void insertUser(User user) {
        userDao.save(user);
    }
}
